package org.hdl.anima.transport;

import java.net.InetSocketAddress;
/**
 * 
 * @author qiuhd
 * @since  2014-7-24
 * @version V1.0.0
 */
public interface Channel extends Endpoint {
	/**
	 * is connected
	 * @return 
	 */
	boolean isConnected();
	/**
	 * 
	 * @return
	 */
	InetSocketAddress getRemoteAddress();
	/**
	 * 
	 * @param key
	 * @return
	 */
	Object getAttribute(String key);
	/**
	 * set up attribute
	 * @param key
	 * @param object
	 * @return
	 */
	void setAttribute(String key,Object object);
	/**
	 * contains attribute
	 * @param key
	 * @return
	 */
	boolean contains(String key);
    /**
     * remove attribute.
     * 
     * @param key key.
     */
    void removeAttribute(String key);
}

